package com.zmn.plat.services.interfaces.channel;

import java.util.List;

import com.zmn.plat.model.entity.channel.ChannelServiceMaster;
import com.zmn.plat.model.entity.channel.ChannelServiceMasterPageListVO;
import com.zmn.plat.model.entity.channel.ChannelServiceMasterQuery;

/**
 * 渠道服务工程师
 *
 * @author xiangjunming
 * @since 2019 /10/16 10:32:11
 */
public interface ChannelServiceMasterService {

    /**
     * 根据ID查询
     *
     * @param id
     *            the id
     * @return the channel service master
     */
    ChannelServiceMaster findByKey(Integer id);

    /**
     * 根据ID查询白名单工程师
     *
     * @param channelId
     *            渠道ID
     * @return the channel service master
     */
    List<ChannelServiceMaster> listByChannelId(Integer channelId);

    /**
     * 根据渠道ID和黑白名单类型查询工程师，如果type不传则查询该渠道所有工程师
     * @param channelId
     * @param type
     * @return
     */
    List<ChannelServiceMaster> listByChannelIdAndType(Integer channelId, Integer type);

    /**
     * 根据页面条件查询
     *
     * @param query
     *            渠道ID
     * @return the channel service master
     */
    List<ChannelServiceMasterPageListVO> listPageByQuery(ChannelServiceMasterQuery query);

    /**
     * 分页记录数
     *
     * @param query
     *            the query
     * @return the integer
     */
    Integer countByQuery(ChannelServiceMasterQuery query);

    /**
     * 根据页面条件查询
     *
     * @param query
     *            渠道ID
     * @return the channel service master
     */
    List<ChannelServiceMasterPageListVO> listMasterPageByQuery(ChannelServiceMasterQuery query);

    /**
     * 分页记录数
     *
     * @param query
     *            the query
     * @return the integer
     */
    Integer countMasterByQuery(ChannelServiceMasterQuery query);

    /**
     * 新增
     *
     * @param record
     *            the record
     * @return the int
     */
    int insert(ChannelServiceMaster record);

    /**
     * 批量新增
     *
     * @param list
     *            the record
     * @return the int
     */
    int insertBatch(List<ChannelServiceMaster> list);

    /**
     * 根据ID删除
     *
     * @param id
     *            the id
     * @return the int
     */
    int deleteByKey(Integer id);

    /**
     * 批量删除
     *
     * @param ids
     *            the id
     * @return the int
     */
    int deleteBatch(List<Integer> ids);
}